package com.lingdian.common.util;

import java.io.File;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public class TestHtml {
	public static void main(String[] args) {
		
		File dir = new File("E:\\jianli");
		File[] files = dir.listFiles();
		int htmlCount = 0;
		for(File file:files){
			if(file.getName().endsWith("html")){
				htmlCount++;
			}else if(file.getName().endsWith(".mht")){
				String html = MhtUtil.mht2html(file.getPath());
				Document dom = Jsoup.parse(html);
				String info = dom.body().text();
				System.out.println(info);
			}
		}
		System.out.println("count:"+htmlCount);
	}	

}
